package br.com.conjuntos.exercicios;

class A{
	int b;
	A(int b){
		this.b = b;
	}
	public boolean equals(Object o){
		if((o instanceof A)&& (((A)o).b==this.b))
			return true;
		return false;
	}
}
public class Programa1 {
	public static void main(String[] args) {
		A x = new A(20);
		A y = new A(10);
		A z = new A(20);
		System.out.println(x.equals(y));//false
		System.out.println(x.equals(z));//true
		System.out.println(y.equals(z));//false
	}
}
